package javaidiot;

import java.sql.*;

/**
 *
 * @author Master
 */
public class Update extends SQLConnection {

    private static ResultSet result;

    public Update(String driver, String server, String props, String query) {
        super(driver, server, props);
        result = query(query);
    }

    private ResultSet query(String query) {
        ResultSet rs = null;
        Statement stmt = null;

        try {
            stmt = connection.createStatement();
        } catch (SQLException e) {
            debug(e.getMessage());
        }
        try {
            rs = stmt.executeQuery(query);
            result = rs;
        } catch (SQLException e) {
            debug(e.getMessage());
        }
        return rs;
    }
}
